package com.elong.businesstravel.modules.home.ticket.adapter;

import com.android.support.jhf.debug.DebugLog;
import com.elong.businesstravel.base.Constant;
import com.elong.businesstravel.modules.home.ticket.ticketshow.TicketListFragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * 火车票列表pageradapter
 * 
 * @author lenovo
 * 
 */
public class TicketPagerAdapter extends FragmentPagerAdapter {

	public TicketPagerAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int arg0) {
		DebugLog.logI("TicketListAdapter : " + arg0);
		TicketListFragment ticketListFragment = new TicketListFragment();
		Bundle args = new Bundle();
		args.putInt("num", arg0);
		ticketListFragment.setArguments(args);
		return ticketListFragment;
	}

	@Override
	public int getCount() {
		return Constant.TRAIN_TICKET_DAY_COUNT;
	}

}
